<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>媒体查询</title>
    <style>
        /* 屏幕宽度小于等于768px时生效 */
        @media (max-width: 768px){
            body {
                background-color: #6688f8;
            }
        }
        /* 屏幕宽度大于等于768px时生效 */
        @media (min-width: 1200px){
            body {
                background-color: #f8ace8;
            }
        }
    </style>
</head>
<body>
    
</body>
</html>